export default{
    ergodicMenu: function(currentRouter,menuData){
        let menuCurry = '';
        menuData = JSON.parse(menuData);
        for (let key = 0; key < menuData.length; key++) {
            let menuSub = menuData[key].children;
            for (let index = 0; index < menuSub.length; index++) {
                if(currentRouter == menuSub[index].node_path){
                    const twoSub = menuSub[index].children;
                    if(twoSub){
                        menuCurry = twoSub.map(function(obj){
                            return obj.node_path
                        }).join(',')
                    }
                    
                }            
            }
        }
        return menuCurry;
    }
}